package LC;

/**
 * @ClassName ReverseSentence
 * @Description: TODO
 * @Author hl
 * @Date 2020/6/10
 * @Version V1.0
 **/
public class ReverseSentence {
    public String ReverseSentence(String str) {
      String target=str.trim();
      String [] arrs=target.split(" ");
      StringBuffer result=new StringBuffer();
      for(int i=arrs.length;i>=0;i--){
          result.append(arrs[i]);
      }
      return  result.toString();
    }
}
